<div class="ui-g-12 p-new-pannel ui-g-nopad">
    <!--查看处罚  begin -->
    <p-panel headerClass="bg-none">
        <p-header>
            <div class="text-right p-6-0 h-48">
                <span class="border-l-1a8fe8 p-l-8 pull-left m-t-8">
                    查看处罚
                    <span class="panel-status-success" *ngIf="punishRecordData.status">{{storage.dicFilter('penaltyStatus',punishRecordData.status)}}</span>
                </span>
                <button pButton type="button" (click)="openDialogAudit();" class="btn btn-primary m-l-8" label="申诉审核" *ngIf="punishRecordData.status === 'penaltyStatus_180125000064'" ></button>
            </div>
        </p-header>
        <div class="border-b-d9d9d9">
            <p-doubleTable [titleWidth]="160" [style]="{width:'1260px'}" [value]="punishRecordData" [rowClos]="punishRecordHead">

            </p-doubleTable>
        </div>
    </p-panel>
    <!-- 查看处罚  begin -->

    <!-- 操作记录 begin-->
    <p-panel headerClass="bg-none " contentClass="p-0" styleClass="m-t-20 radius-none">
        <p-header>
            <div class="text-right p-6-0 h-48">
                <span class="border-l-1a8fe8 p-l-8 pull-left m-t-8">
                    操作人记录
                </span>
            </div>
        </p-header>
        <div class="p-20 border-b-d9d9d9">
            <p-dataTable [value]="recordData" [showTableHeader]="true" [editable]="true">
                <p-column header="序号" [style]="{'width':'8%'}">
                    <ng-template let-col let-ri="rowIndex" pTemplate="body">
                        {{ri+1}}
                    </ng-template>
                </p-column>
                <p-column field="operationContent" header="操作"></p-column>
                <p-column field="afterSubmitStatus" header="提交后状态">
                    <ng-template let-col let-data="rowData" pTemplate="body">
                        {{storage.dicFilter('penaltyStatus',data[col.field])}}
                    </ng-template>
                </p-column>
                <p-column field="submitPersonName" header="提交人">
                  <ng-template let-col let-data="rowData" pTemplate="body">
                    {{data[col.field]}}&nbsp;{{storage.dicFilter('user_type',data['submitPersonType'])}}
                  </ng-template>
                </p-column>
                <p-column field="telephone" header="手机号"></p-column>
                <p-column field="submitTime" header="提交时间"></p-column>
                <p-column field="isAutoConfirm" header="是否是自动确认">
                    <ng-template let-col let-data="rowData" pTemplate="body">
                        {{ data[col.field] == true ? '是' : '否'}}
                    </ng-template>
                </p-column>
            </p-dataTable>
        </div>
    </p-panel>
    <!-- 操作记录 end-->

    <!-- 表单 begin-->
    <p-dialog [header]="'审核'" [(visible)]="isShow" modal="modal" width="700" [responsive]="true">
        <div class="text-center">
            <div class="inline-block">
                <form #form="ngForm" (ngSubmit)="form.form.valid" novalidate class="form-horizontal" role="form">

                    <div class="table-row">
                        <div class="table-cell text-right p-l-25 p-required">审核结果：</div>
                        <div class="table-cell text-left relative">
                            <p-radioButton name="status" value="penaltyStatus_180125000065" label="通过" [(ngModel)]="formObj.status" (onClick)="changeStatus();"></p-radioButton>
                            <p-radioButton name="status" value="penaltyStatus_180125000066" label="不通过" [(ngModel)]="formObj.status" (onClick)="changeStatus();"></p-radioButton>
                            <p-message [severity]="'error'"   styleClass="p-center" [text]="{'请选择审核结果':errorObj.status?.show}">
                            </p-message>
                        </div>
                    </div>

                    <div class="table-row">
                        <div class="table-cell text-right p-l-25">免额：</div>
                        <div class="table-cell text-left icon-text relative" data-text="元">
                            <input type="text" name="freeAmount" #freeAmount="ngModel" [disabled]="freeAmountDisplay" [(ngModel)]="formObj.freeAmount" class="p-input  width-220" pInputText placeholder="请输入免额"
                                maxlength="10" (blur)="verifyFields(freeAmount,formObj);" (focus)="submited=false;clearVerify(freeAmount);" required
                                numberType="decimal2" [ngClass]="(freeAmount.errors?.pattern && (errorObj.freeAmount?.show || submited)) ? 'p-input-error' : ''">
                            <p-message  styleClass="p-center1" [severity]="'error'" [text]="{'请输入免额':(freeAmount.errors?.required&&(errorObj.freeAmount?.show || submited)),'请低于罚款金额': (freeAmount.value > punishRecordData.pubishAmout) && (errorObj.freeAmount?.show || submited)}">
                            </p-message>
                        </div>
                    </div>

                    <div class="table-row">
                        <div class="table-cell text-right p-l-25 v-top p-required">原因/备注：</div>
                        <div class="table-cell relative">
                            <textarea rows="5" cols="35" name='approveReason' #approveReason [(ngModel)]="formObj.approveReason"[ngStyle]="{'width': '220px' }" maxlength="50"
                                pInputTextarea (blur)="verifyFields(approveReason,formObj);" (focus)="submited=false;clearVerify(approveReason);"
                                [ngClass]="(!(formObj.approveReason?.length>0))&&(errorObj.approveReason?.show || submited ) ? 'p-input-error' : ''"></textarea>
                            <div class="text-right opacity06">还可输入{{50 - (formObj.approveReason?.length || 0)}}个字</div>
                            <p-message styleClass="p-right" [severity]="'error'" [text]="{'请输入备注':(!(formObj.approveReason?.length>0))&&(errorObj.approveReason?.show || submited )}">
                            </p-message>
                        </div>
                    </div>

                    <div class="table-row">
                        <div class="table-cell text-right p-l-25"></div>
                        <div class="table-cell text-left">
                            <button pButton (click)="submited=true;save();" label="确定" class="btn-success"></button>
                            <button pButton (click)="isShow = false;" label="取消" class="btn-secondary m-r-30"></button>
                        </div>
                    </div>

                </form>

            </div>
        </div>
    </p-dialog>
    <!-- 表单 end-->
</div>
